package demo;

public class Father {
    public void eat() {
        System.out.println("吃肉");
    }
}

class Son extends Father {
    @Override
    public void eat() {
        System.out.println("吃荤素搭配");
    }

    public static void main(String[] args) {
        Father father = new Son();
        father.eat();
    }
}